using UnityEngine;
using System.Collections;

public class Camera : MonoBehaviour {
	
	public Transform target;
	public float relativeHeight = 10.0f;
	public float zDistance = 5.0f;
	public float dampSpeed = 2;
	
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		Vector3 newPos = target.position + new Vector3(0,relativeHeight, -zDistance);
		
		transform.position = Vector3.Lerp(transform.position, newPos, Time.deltaTime*dampSpeed);
	}
}
